home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / DeterminedNoteStructure.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  3.2 KB  |  110 lines  |  [TEXT/KAHL]

  1. /* DeterminedNoteStructure.h */
  2.  
  3. #ifndef Included_DeterminedNoteStructure_h
  4. #define Included_DeterminedNoteStructure_h
  5.  
  6. /* DeterminedNoteStructure module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Memory */
  12. /* BinaryCodedDecimal */
  13. /* NoteObject */
  14. /* IncrementalParameterUpdator */
  15. /* FloatingPoint */
  16. /* Frequency */
  17. /* PlayTrackInfoThang */
  18.  
  19. struct FrozenNoteRec;
  20. typedef struct FrozenNoteRec FrozenNoteRec;
  21.  
  22. /* forwards */
  23. struct IncrParamUpdateRec;
  24. struct NoteObjectRec;
  25.  
  26. #ifdef ShowMeFrozenNoteRec
  27. struct FrozenNoteRec
  28.     {
  29.         /* reference to the note that defines this note.  this is used for determining */
  30.         /* the following things: */
  31.         /*   - hertz or halfsteps for portamento */
  32.         /*   - the target of a tie */
  33.         struct NoteObjectRec*        OriginalNote;
  34.  
  35.         /* frequency determined by pitch index + detuning, in Hertz */
  36.         float                                        NominalFrequency;
  37.  
  38.         /* frequency used for doing multisampling, in Hertz */
  39.         float                                        MultisampleFrequency;
  40.  
  41.         /* acceleration of envelopes */
  42.         float                                        HurryUpFactor;
  43.  
  44.         /* portamento duration, in envelope ticks */
  45.         long                                        PortamentoDuration;
  46.  
  47.         /* duration, in envelope ticks */
  48.         long                                        Duration;
  49.  
  50.         /* first release point, in envelope ticks after start of note */
  51.         long                                        ReleasePoint1;
  52.         MyBoolean                                Release1FromStart;
  53.         /* second release point, in envelope ticks after start of note */
  54.         long                                        ReleasePoint2;
  55.         MyBoolean                                Release2FromStart;
  56.         /* third release point, in envelope ticks after start of note */
  57.         long                                        ReleasePoint3;
  58.         MyBoolean                                Release3FromStart;
  59.  
  60.         /* overall loudness adjustment for envelopes, including global volume scaling */
  61.         float                                        LoudnessAdjust;
  62.  
  63.         /* stereo positioning for note */
  64.         float                                        StereoPosition;
  65.  
  66.         /* accent values for controlling envelopes */
  67.         float                                        Accent1;
  68.         float                                        Accent2;
  69.         float                                        Accent3;
  70.         float                                        Accent4;
  71.  
  72.         /* pitch displacement maximum depth */
  73.         float                                        PitchDisplacementDepthLimit;
  74.         /* operation mode:  False = half steps, True = hertz */
  75.         MyBoolean                                PitchDisplacementDepthInHertz;
  76.  
  77.         /* pitch displacement maximum rate, in LFO Hertz */
  78.         float                                        PitchDisplacementRateLimit;
  79.  
  80.         /* pitch displacement start point, in envelope clocks after start of note */
  81.         long                                        PitchDisplacementStartPoint;
  82.  
  83.         /* list crud */
  84.         FrozenNoteRec*                    Next;
  85.     };
  86. #endif
  87.  
  88. /* flush cached frozen note blocks */
  89. void                                FlushFrozenNoteStructures(void);
  90.  
  91. /* make sure the frozen note structure is valid */
  92. #if DEBUG
  93. void                                ValidateFrozenNote(FrozenNoteRec* FrozenNote);
  94. #else
  95. #define ValidateFrozenNote(x) ((void)0)
  96. #endif
  97.  
  98. /* dispose of a note object */
  99. void                                DisposeFrozenNote(FrozenNoteRec* FrozenNote);
  100.  
  101. /* build a new note object with all parameters determined.  *StartAdjustOut */
  102. /* indicates how many ticks before (negative) or after (positive) now that */
  103. /* the key-down should occur.  this is added to the scanning gap size and envelope */
  104. /* origins to figure out how to schedule the note */
  105. FrozenNoteRec*            FixNoteParameters(struct IncrParamUpdateRec* GlobalParamSource,
  106.                                             struct NoteObjectRec* Note, long* StartAdjustOut,
  107.                                             float OverallVolumeScaling, float EnvelopeTicksPerDurationTick);
  108.  
  109. #endif
  110.